package com.zcxy.mybatis.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;

/**
 * 用户
 *
 * @author zcc
 * @email 860474958@qq.com
 * @date 2020-06-01
 */
@Data
@TableName("sys_user")
@ApiModel(value = "SysUser", description = "用户实体对象")
public class SysUser extends BaseEntity {
    private static final long serialVersionUID = 1L;


    @ApiModelProperty(value = "主键", required = false)
    @TableId(type = IdType.UUID)
    private String id;


    @ApiModelProperty(value = "姓(50)", required = false)
    @Length(max = 50, message = "surname 超出最大长度50")
    private String surname;


    @ApiModelProperty(value = "名(50)", required = false)
    @Length(max = 50, message = "name 超出最大长度50")
    private String name;


    @ApiModelProperty(value = "邮箱(50)", required = true)
    @Length(max = 50, message = "email 超出最大长度50")
    private String email;


    @ApiModelProperty(value = "文件服务器", required = false)
    @Length(max = 50, message = "fileServer 超出最大长度50")
    private String fileServer;


    @ApiModelProperty(value = "手机", required = false)
    @Length(max = 50, message = "telephone 超出最大长度50")
    private String telephone;


    @ApiModelProperty(value = "座机", required = false)
    @Length(max = 50, message = "fixedlineTelephone 超出最大长度50")
    private String fixedlineTelephone;


    @ApiModelProperty(value = "地址", required = false)
    @Length(max = 50, message = "address 超出最大长度50")
    private String address;


    @ApiModelProperty(value = "城市", required = false)
    @Length(max = 50, message = "city 超出最大长度50")
    private String city;


    @ApiModelProperty(value = "邮政编码", required = false)
    @Length(max = 50, message = "postalCode 超出最大长度50")
    private String postalCode;


    @ApiModelProperty(value = "备注", required = false)
    @Length(max = 255, message = "status 超出最大长度255")
    private String remark;



    @ApiModelProperty(value = "文件oss外网url", required = false)
    @Length(max = 50, message = "文件oss外网url")
    private String url;

    @ApiModelProperty(value = "用户状态", required = false)
    @Length(max = 1, message = "status 超出最大长度1")
    private String status;

    @ApiModelProperty(value = "附件的唯一编码", required = false)
    @Length(max = 500, message = "附件的唯一编码")
    private String fileUuid;

    @TableField(exist = false)
    @ApiModelProperty(value = "文件oss外网url", required = false)
    private String fileOssUrl;


    @ApiModelProperty(value = "(0非admin1是)", required = false)
    @Length(max = 1, message = "admin 超出最大长度1")
    private String admin;

    @ApiModelProperty(value = "密码", required = false)
    @Length(max = 50, message = "password 超出最大长度50")
    private String password;


    @ApiModelProperty(value = "加密盐", required = false)
    @Length(max = 50, message = "salt 超出最大长度50")
    private String salt;

    @ApiModelProperty(value = "全名", required = false)
    @Length(max = 50, message = "userName 超出最大长度50")
    private String userName;

    @ApiModelProperty(value = "登录名", required = true)
    @Length(max = 50, message = "loginName 超出最大长度50")
    @NotEmpty(message = "loginName 不能为空")
    private String loginName;


    @TableField(exist = false)
    private String jwtId;


}
